package com.hdl.design.pattern.prototype;

import java.io.Serializable;

/**
 * 类名 User
 * 描述 TODO
 *
 * @author hedonglin
 * @version 1.0
 * @date 2019/9/25 11:17
 */
public class User implements Cloneable, Serializable {

    public User(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    /**
     * 姓名
     */
    private String name;
    /**
     * 年龄
     */
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    protected User clone() throws CloneNotSupportedException {
        return (User) super.clone();
    }
}
